package com.yiqi.liebang.framework;

import com.baiiu.filter.ClassifyBo;
import com.flyco.tablayout.listener.CustomTabEntity;
import com.yiqi.liebang.R;
import com.yiqi.liebang.common.widget.TabEntity;
import com.yiqi.liebang.entity.bo.CouponBo;
import com.yiqi.liebang.entity.bo.EducationBo;
import com.yiqi.liebang.entity.bo.MenuBo;
import com.yiqi.liebang.entity.bo.QuestionBo;
import com.yiqi.liebang.entity.bo.SelectBo;
import com.yiqi.liebang.entity.bo.StepBo;
import com.yiqi.liebang.entity.bo.UserCenterBo;
import com.yiqi.liebang.entity.bo.WorkBo;

import java.util.ArrayList;
import java.util.List;

public class DataServer {
    public static final String RONG_TOKEN = "6W8yR26RSqQDZMKDoQlIiOwc8fil1gVMr17cG81JfCN2WoD72EtMd7z9uo7Y6Bt2pIIOFZD8hv8az4bHu3TtGgYgh7XN0Hvs";

    public static List<String> getBannerData() {
        List<String> strings = new ArrayList<>();
        strings.add("http://img.500.com/upimages/ad/201804/20180402170924_1353.jpg");
        strings.add("http://img.500.com/upimages/ad/201804/20180403143107_3413.jpg");
        strings.add("http://img.500.com/upimages/sfc/201803/20180313151900_4909.jpg");
        strings.add("http://public.zgzcw.com/d/images/2018221517555242416_788.jpg");
        strings.add("http://public.zgzcw.com/d/images/2018431522718720789_715.jpg");
        return strings;
    }

    public static List<MenuBo> getMenuData() {
        List<MenuBo> strings = new ArrayList<>();
        strings.add(new MenuBo(R.drawable.list_button_zhichang, "职场发展"));
        strings.add(new MenuBo(R.drawable.list_button_hulianwang, "互联网+"));
        strings.add(new MenuBo(R.drawable.list_button_chuanghyezhe, "创业者"));
        strings.add(new MenuBo(R.drawable.list_button_touziren, "投资人"));
        strings.add(new MenuBo(R.drawable.list_button_jiaoyu, "教育学习"));
        strings.add(new MenuBo(R.drawable.list_button_yanglao, "养老护理"));
        strings.add(new MenuBo(R.drawable.list_button_shenghuo, "生活时尚"));
        strings.add(new MenuBo(R.drawable.list_button_quanbu, "全部分类"));


        return strings;
    }

    public static List<QuestionBo> getQuestionData(int count) {
        List<QuestionBo> strings = new ArrayList<>();

        for (int i = 0; i < count; i++) {
            strings.add(new QuestionBo());
        }


        return strings;
    }

    public static List<CouponBo> getCouponBoData(int count) {
        List<CouponBo> strings = new ArrayList<>();

        for (int i = 0; i < count; i++) {
            strings.add(new CouponBo());
        }


        return strings;
    }

    public static ArrayList<CustomTabEntity> getTabEntity() {
        ArrayList<CustomTabEntity> mTabEntities = new ArrayList<>();
        int[] mIconSelectIds = {
                R.drawable.btn_huati, R.drawable.btn_wenda,
                R.drawable.btn_haoyou, R.drawable.btn_dingdan};

        String[] mTitles = {"话题", "问答", "好友", "订单"};

        for (int i = 0; i < mTitles.length; i++) {
            mTabEntities.add(new TabEntity(mTitles[i], mIconSelectIds[i], mIconSelectIds[i]));
        }

        return mTabEntities;
    }
    public static ArrayList<CustomTabEntity> getTabEntityOther() {
        ArrayList<CustomTabEntity> mTabEntities = new ArrayList<>();
        int[] mIconSelectIds = {
                R.drawable.btn_huati,
                R.drawable.btn_wenda,
                R.drawable.btn_haoyou};

        String[] mTitles = {"话题", "问答", "好友"};

        for (int i = 0; i < mTitles.length; i++) {
            mTabEntities.add(new TabEntity(mTitles[i], mIconSelectIds[i], mIconSelectIds[i]));
        }

        return mTabEntities;
    }
    public static List<String> getPrivateData() {
        List<String> strings = new ArrayList<>();
        strings.add("仅好友");
        strings.add("所有人");
        return strings;
    }  public static List<String> getShowPhoneData() {
        List<String> strings = new ArrayList<>();
        strings.add("允许");
        strings.add("不允许");
        return strings;
    }
    public static List<SelectBo> getAddFriendsData() {
        List<SelectBo> strings = new ArrayList<>();
//        strings.add(new SelectBo(0, false, "所有人"));
        strings.add(new SelectBo(1, false, "影响力小于10的"));
        strings.add(new SelectBo(2, false, "未认证基本信息用户  "));
        strings.add(new SelectBo(4, false, "未认证职业信息用户  "));
        strings.add(new SelectBo(3, false, "未认证教育经历用户"));
        return strings;
    }


    public static String getClassfiyStr(List<UserCenterBo.UserClassifyBean> UserClassify) {
        if (UserClassify == null || UserClassify.size() == 0) {
            return "";
        } else {
            String strings = "";
            for (int i = 0; i < UserClassify.size(); i++) {
                strings += UserClassify.get(i).getClassify() + ",";
            }
            return strings.substring(0, strings.length() - 1);
        }
    }


    public static String getClassfiyStr2(List<ClassifyBo> UserClassify) {
        if (UserClassify == null || UserClassify.size() == 0) {
            return "";
        } else {
            String strings = "";
            for (int i = 0; i < UserClassify.size(); i++) {
                strings += UserClassify.get(i).getClassify() + ",";
            }
            return strings.substring(0, strings.length() - 1);
        }
    }

    public static List<StepBo>  getOrderStautYYFK(){
        List<StepBo> stepBos = new ArrayList<>();
        stepBos.add(new StepBo("预约付款", 0));
        stepBos.add(new StepBo("行家确认", -1));
        stepBos.add(new StepBo("服务完成", -1));
        stepBos.add(new StepBo("学员评价", -1));
        return stepBos;
    }
    public static List<StepBo>  getOrderStautQR(){
        List<StepBo> stepBos = new ArrayList<>();
        stepBos.add(new StepBo("预约付款", 1));
        stepBos.add(new StepBo("行家确认", 0));
        stepBos.add(new StepBo("服务完成", -1));
        stepBos.add(new StepBo("学员评价", -1));
        return stepBos;
    }
    public static List<StepBo>  getOrderStautYYWC(){
        List<StepBo> stepBos = new ArrayList<>();
        stepBos.add(new StepBo("预约付款", 1));
        stepBos.add(new StepBo("行家确认", 1));
        stepBos.add(new StepBo("服务完成", 0));
        stepBos.add(new StepBo("学员评价", -1));
        return stepBos;
    }
    public static List<StepBo>  getOrderStautYYPJ(){
        List<StepBo> stepBos = new ArrayList<>();
        stepBos.add(new StepBo("预约付款", 1));
        stepBos.add(new StepBo("行家确认", 1));
        stepBos.add(new StepBo("服务完成", 1));
        stepBos.add(new StepBo("学员评价", 1));
        return stepBos;
    }

    public static String dataToWorkString(List<WorkBo> workBos) {
        StringBuilder sb = new StringBuilder();
        if (workBos==null) return "";
        for(int i = 0; i < workBos.size(); i++) {
            if (sb.length() > 0) {//该步即不会第一位有逗号，也防止最后一位拼接逗号！
                sb.append(",");
            }
            sb.append(workBos.get(i).getId());
        }
        return sb.toString();
    }
    public static String dataToEduString(List<EducationBo> workBos) {
        StringBuilder sb = new StringBuilder();
        if (workBos==null) return "";
        for(int i = 0; i < workBos.size(); i++) {
            if (sb.length() > 0) {//该步即不会第一位有逗号，也防止最后一位拼接逗号！
                sb.append(",");
            }
            sb.append(workBos.get(i).getId());
        }
        return sb.toString();
    }


}
